<template>
  <div class="blog-container">
    <Background />
    <BlogHeader :data="permissionStore.blogChild" base-path="/blog" />
    <section class="app-main">
      <router-view>
        <template #default="{ Component, route }">
          <!-- <transition enter-active-class="animate__animated animate__fadeIn" mode="out-in"> -->
          <keep-alive>
            <component :is="Component" :key="route.path" />
          </keep-alive>
          <!-- </transition> -->
        </template>
      </router-view>
    </section>
  </div>
</template>

<script setup lang="ts">
import BlogHeader from "./components/BlogHeader.vue";
import Background from "./components/Background.vue";
import { useBlogPermissionStore } from "@/store";

defineOptions({
  name: "Blog",
  inheritAttrs: false,
});

const permissionStore = useBlogPermissionStore();
</script>

<style lang="scss" scoped>
.blog-container {
  background: rgba(0, 0, 0);
}
</style>
